 <script type="text/javascript">
 function onSysUserTree_Click (node) {
 	$('#dg_SysUserTree').datagrid({
 		url: '/OA/Admin/SysModule/getCurrentModule?mid=' + node.id
 	})
 }
 </script>
 <div class="easyui-layout" data-options="fit:true,border:false">
 	<div region="north" style="height: 50px; border-width: 0 0 1px 0; padding: 1px">
 		<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',iconAlign:'top',plain:true,width:56">Query</a>
 		<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',iconAlign:'top',plain:true,width:56">Add</a>
 		<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',iconAlign:'top',plain:true,width:56" onclick="save_SysUserTree()">Save</a>
 	</div>
 	<div data-options="region:'west',split:true" style="width:180px;border-left: none">
 		<ul class="easyui-tree" data-options="url:'/OA/Admin/SysModule/getModule',onClick:onSysUserTree_Click">	
 		</ul>
 	</div>
 	<div data-options="region:'center',iconCls:'icon-ok'">
 		<table id="dg_SysUserTree" class="easyui-datagrid" 
				data-options="
					iconCls: 'icon-edit',
					singleSelect: true,
					method:'get',
					fit:true,
					border:false, 
					fitColumns:true,
					onClickCell: onClickCell
				">
			<thead>
				<tr>
					<th data-options="field:'moduleid'">{$moduleid}</th>
					<th data-options="field:'modulename',editor:'text'">{$modulename}</th>
					<th data-options="field:'url'">{$url}</th>
					<th data-options="field:'params'">{$params}</th>
					<th data-options="field:'target'">{$target}</th>
					<th data-options="field:'icon'">{$icon}</th>
					<th data-options="field:'sort'">{$sort}</th>
				</tr>
			</thead>
		</table>
	</div>
 </div>
 <script type="text/javascript">
	function save_SysUserTree () {
		var dg = $('#dg_SysUserTree');
		if (endEditing(dg)){
			var rows = getChanges(dg);
			alert(JSON.stringify(rows));
		}
	}
	
 </script>